{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "@courses_bp.route(\"/test_db_connection\")\n",
    "def test_db_connection():\n",
    "    try:\n",
    "        result = db.session.execute(\"SELECT 1\").scalar()\n",
    "        return (\n",
    "            \"Database connection successful!\" if result == 1 else \"Connection failed.\"\n",
    "        )\n",
    "    except Exception as e:\n",
    "        return f\"Error: {str(e)}\""
   ]
  }
 ],
 "metadata": {
  "language_info": {
   "name": "python"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
